<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    #root {
        width: 300px;
        height: 200px;
        border: 1px solid red;
    }
</style>

<body>
    <a href="#good">good</a>
    <a href="#yes">yes</a>
    <div id="root"></div>
</body>
<script>
    let root = document.getElementById("root")
    window.addEventListener("hashchange", () => {
        let hash = location.hash
        switch (hash) {
            case "#good":
                root.innerHTML = "good--good==good"
                break;
            case "#yes":
                root.innerHTML = "yes---yes---yes"
                break;
            default:
                root.innerHTML = 404
                break;
        }

    })
</script>

</html>